package com.zoweunion.mechanic.service.order;

import com.github.pagehelper.PageInfo;
import com.zoweunion.mechanic.model.ResponseBean;
import com.zoweunion.mechanic.util.*;
import com.zoweunion.mechanic.util.certificate.OperationCertificate;
import com.zoweunion.mechanic.util.certificate.OperationCertificateOrder;
import com.zoweunion.mechanic.util.certificate.OperationCertificateOrderDetail;
import com.zoweunion.mechanic.util.certificate.OrderPay;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

public interface CGOrderService {

	/**
	 * 根据订单状态查询列表
	 * @param reqMap    order_statuses u_t_id
	 * @return
	 */
	Map<String, Object> listByStatus(Map<String, Object> reqMap);

	/**
	 * 仓管工单 获取工单详情 需要 工单数据 修工数据 总配件  增加配件  减少配件
	 * @param reqMap
	 * @return
	 */
	Map<String, Object> getOrderInfo(Map<String, Object> reqMap);
	

	/**
	 * 仓管工单 仓库的库存不充足
	 * @param reqMap
	 * @return
	 */
	int doNoEnough(Map<String, Object> reqMap);

	int insertParts(Map<String, Object> upkeepPartsMap, String order_id, String id, int type, String current_user_id);

	int insertzjParts(Map<String, Object> reqMap) throws MyException;

	int insertjsParts(Map<String, Object> jianshaoPartsMap, String order_id, String uuid, int type,
                      String current_user_id);

	int insertxzParts(Map<String, Object> xinzengPartsMap, String order_id, String uuid, int type,
                      String current_user_id);

	int updateOrderStatus(Map<String, Object> reqMap);

	int insertOrderDetail(String order_id, String uuid, String handle_user);

	void refreshParts();

    void countParts();

	PageInfo<CGOrderEntity> selectPartsCount(Map<String,Object> map);

    void orderException();

	OrderException selectOrderCountHead(Map<String, Object> map) throws ParseException;

	PageInfo selectOrderByException(Map<String, Object> map) throws ParseException;

	PageInfo selectOrderByTime(Map<String, Object> map) throws ParseException;

	Map<String, Object> selectPercentByUser(Map<String, Object> map) throws ParseException;

    void updateTimeOuTDeploy(TimeOutDeploy timeOutDeploy);

	ResponseBean insertTimeOutLevel(TimeOutLevel timeOutLevel);

	TimeOutDeploy selectTimeOuTDeploy(TimeOutDeploy timeOutLevel);

	List<TimeOutLevel> selectTimeOutLevel(TimeOutLevel timeOutLevel);

    void selectDictionariesBy();

	PageInfo selectDictionariesByList(Map<String, Object> map);

	ResponseBean insertDictionaries(DictionariesFault dictionariesFault);

	void deleteDictionaries(DictionariesFault dictionariesFault);

	String insertCertificateOrder(OperationCertificateOrder order);

	void deleteTest();

	ResponseBean insertCertificate(OperationCertificate order);

	void deleteCertificate(OperationCertificate order);

	List<OperationCertificate> selectCertificate(Map<String, Object> map);

	ResponseBean updateCertificate(OperationCertificate order);

	OrderPay insertCertificateOrderPay(OrderPay order);

	OperationCertificateOrder selectCertificateOrderInfo(Map<String, Object> map);

	void updateCertificateOrderStatus(OperationCertificateOrder order);

	void updateCertificateOrder(OperationCertificateOrder order);

	PageInfo selectCertificateBusiness(Map<String, Object> map);

	void deleteCertificateOrderStatus(OperationCertificateOrder order);

	ResponseBean updateCertificateExpress(OperationCertificateOrder order);

	OperationCertificateOrder logisticsExpress(Map<String, Object> reqMap);

	void insertCertificateOrderDetail(OperationCertificateOrderDetail operationCertificateOrderDetail,OperationCertificateOrder order);

    void updateKateWorkHour();
}
